// src/store/index.js
import { createStore } from 'vuex'

const store = createStore({
  state: {
    footerActive: 'index' // 底部导航栏激活下标，默认为主页
  },
  mutations: {
    // 设置底部导航栏激活下标
    setFooterActive(state, value) {
      state.footerActive = value
    }
  },
  getters: {
    // 获取底部导航栏激活下标
    getFooterActive(state) {
      return state.footerActive
    }
  }
})

export default store
